﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class D09_WWW : MonoBehaviour
{
    private void Start()
    {
        StartCoroutine(WWWTest());
    }

    //
    private IEnumerator WWWTest()
    {
        print("开始访问百度");
        WWW www = new WWW("https://baidu.com"); //支持  file://    ftp://    jar://
        yield return www;//等待网页访问完成
        print(www.text);
        System.IO.File.WriteAllText("baidu.html", www.text);
    }
}